<#include "/tags/updatedSinceTag.ftl">

<#macro publicProfileHeader info>
	<#if info?? && info.notificator??>
		<#assign avatarURL="/images/avatar.png"/>
		<#if info.notificator.avatarURL??>
			<#assign avatarURL=info.notificator.avatarURL/>
		</#if>
		<#assign userStatus=""/>
		<#if info.userStatus.statusText??>
			<#assign userStatus=info.userStatus.statusText/>
		</#if>
		<div id="acc_contain"> 
			<span class="avatar" >
				<img id="userAvatar" src="${avatarURL}" alt="${info.username}" />
			</span>
			
	    	<div class="infomation" style="width:700px">
				<h2 class="publicHeader">${info.username}</h2>
				<div class="clearthis"></div>
	      		<div class="title">
	      			<#if (userStatus?? && userStatus?has_content)>
					<b class="fl" style="font-weight:normal;color:#666">Trạng thái:</b>
					</#if>
	      			<b class="fl"> “</b>
	        		<p style="display:inline">
	        			<#if (userStatus?? && userStatus?has_content)>
	        				${userStatus}	        				
	        			<#else>
	        				<i style="color:#999">Hiện tại, ${info.username} chưa chia sẻ trạng thái.</i> 
	        			</#if>
	        		</p>
	        		<b>”</b>	        		
	        		<#if (info.userInSession?? && userStatus?? && userStatus?has_content)>
	        			<#if info.userStatus.thumbStatus??>
	        				<span class="thumbBox">
								<a class="icon_1 thumbUp ${info.userStatus.thumbStatus?string('thumbUpSelected','')}" href="${info.userStatus.thumbStatus?string('#','javascript:thumb(${info.userStatus.userStatusId}, true)')}" id="thumb_up" title="Thích trạng thái này">Thích</a>
								<b class="fl countNumber">${info.userStatus.countThumbedUpStatus}</b>
								<a class=" icon_1 thumbDown ${info.userStatus.thumbStatus?string('','thumbDownSelected')}" href="${info.userStatus.thumbStatus?string('javascript:thumb(${info.userStatus.userStatusId}, false)','#')}" id="thumb_down" title="Không thích trạng thái này">Không thích</a>
								<b class="fl countNumber">${info.userStatus.countThumbedDownStatus}</b>
							</span>
	        			<#else>
							<span class="thumbBox">
								<a class="icon_1 thumbUp" href="javascript:thumb(${info.userStatus.userStatusId}, true)" id="thumb_up">UP</a>
								<b class="fl countNumber">${info.userStatus.countThumbedUpStatus}</b>
								<a class="icon_1 thumbDown" href="javascript:thumb(${info.userStatus.userStatusId}, false)" id="thumb_down">DOWN</a>
								<b class="fl countNumber">${info.userStatus.countThumbedDownStatus}</b>
							</span>
	        			</#if>
	        		</#if>
	        	</div>
	      		<div class="updatetime">
	      			<#if info.notificator.updatedSince??>
		      			<@updatedSince minutes=info.notificator.updatedSince prefix='page.dashboard.updateSince'/>
		      		</#if>	
	      		</div>
	      		<div class="publicLink">
		      		<a>Gửi tin nhắn cho ${info.username}</a> | 
		      		<a>Cù lét ${info.username}</a> |
		      		<a>Xóa khỏi danh sách quan tâm</a>
		      	</div>		            	
			</div>
			<#if info.userInSession??>
	        	<#if info.username??>	    
	        		<#if info.username != info.userInSession>    	
			        	<#if info.pendingAcceptFollow??>
				        	<#if info.pendingAcceptFollow>
				        		<div class="FollowFriend"><a class="FollowWait" href="javascript:void(0)" ></a></div>
				        	<#else>
				        		${info.followed?string('<div class="FollowFriend"><a class="Followed" href="javascript:stopFollow(\'${info.username}\')" ></a></div>','<div class="FollowFriend"><a href="javascript:follow(\'${info.username}\', \'${info.userId}\')" ></a></div>')}
				        	</#if>				         
				        </#if>
			        </#if>
		        </#if>     		        	
	        </#if>	
		</div>
	</#if>
</#macro>
